import API from '@/utils/request'
//查询购物车
export const getSCartList = (userId) => {
	return API.get('/sCart/list', {
		params: { userId }
	})
}
//修改商品数量
export const countChange = (id, userId,count) => {
	return API.get('/sCart/count', {
		params: { id, userId,count }
	})
}
//删除商品
export const delSCart = (userId, id) => {
	return API.delete('/sCart/', {
		params: { userId, id }
	})
}

export const addSCart = (cartDTO) => {
	return API.post('/sCart', cartDTO)
}

//批量删除
export const deleteCartBatch = ({ userId, ids }) => {
	return API.post('/sCart/deleteBatch',{userId, ids})
}
